Skip to content

Conversation

manerlan
Copy link
Member

Changes:

  • Added QueryClient and QueryClientProvider.
  • Pokémon list is now fetched through useQuery.
  • Removed the previous manual in-memory cache.
  • Search now filters the fetched Pokémon list locally instead of making a new API request for each search.
  • Loading and API error states are now handled using TanStack Query.
  • Removed the old searchPokemon implementation that was no longer necessary.

Tested the changes with:

  • npm run lint and npm run build.
  • Manual testing of Pokémon search, error and empty states, and favorites.

@manerlan manerlan requested a review from oscarba September 17, 2026 09:24
@manerlan manerlan requested a review from a team as a code owner September 17, 2026 09:24
@manerlan manerlan linked an issue Sep 17, 2026 that may be closed by this pull request
Copy link
Member

@oscarba oscarba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ser bra ut :) En endring som var viktig for å nå alle kravene! LGTM

@oscarba oscarba merged commit 26d1c1c into main Sep 17, 2026
@oscarba oscarba deleted the 4-implement-tanstack-query-with-pokeapi branch September 17, 2026 09:47
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement TanStack Query with Pokeapi
2 participants